//
//  AboutFoundation.m
//  NRWMall
//
//  Created by 邢毅 on 2018/5/8.
//  Copyright © 2018年 com.anpxd. All rights reserved.
//

#import "AboutFoundation.h"

BOOL isDEBUG(void) {
#ifdef DEBUG
    return YES;
#endif
    return NO;

}

NSString *erpApi(void) {
    if (isDEBUG()) {
        return @"http://testerp.anpxd.com";
    } else {
        return @"https://erp.anpxd.com";
    }
}

NSString *Api(void) {
    if (isDEBUG()) {
        return @"http://testclient.anpxd.com/client-web";
    } else {
        return @"https://client.anpxd.com/client-web";
    }
}

NSString *imageApi(void) {
    if (isDEBUG()) {
        return @"http://testfile.anpxd.com:8083/";
    } else {
        return @"https://fdfs.anpxd.com/";
    }
}

NSString *wxContextApi(void) {
    if (isDEBUG()) {
        return @"http://testwx.anpxd.com/wx-web";
    } else {
        return @"https://wx.anpxd.com/wx-web";
    }
}

BOOL isEmptyString(NSString *string) {
    
    if ([string isKindOfClass:[NSString class]]) {
        
        return !(string && [string stringByReplacingOccurrencesOfString:@" " withString:@""].length);
    }
    return YES;
}

BOOL isNotEmptyString(NSString *string) {
    return !isEmptyString(string);
}

BOOL isDictionaryClass(id obj) {
    return [obj isKindOfClass:NSDictionary.class];
}

BOOL isArrayClassClass(id obj) {
    return [obj isKindOfClass:NSArray.class];
}
